﻿$(document).ready(function() 
{
    var data = [{colunm1:"1",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"2",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"3",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"4",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"5",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"6",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"7",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"8",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"},
                {colunm1:"9",colunm2:"欄位",colunm3:"名稱",colunm4:"資料",colunm5:"測試",colunm6:"20130426"}];
                
   $("#master").grid({height:240,
                      autowidth:true,
                      multiselect: false,
                      rowNum:10,
                      colModel:[{label: "ID", name: "colunm1", align: "center"},
                                {label: "欄位一", name: "colunm2",  align: "center"},
                                {label: "欄位二", name: "colunm3",  align: "left"},
                                {label: "欄位三", name: "colunm4", align: "left"},
                                {label: "欄位四", name: "colunm5", align: "left"},
                                {label: "欄位五", name: "colunm6", align: "left"}]
                        });
   $("#master").gridbind(data);
   $("#combox").combox();
   $("#multiple").combox();
   $(".date").date();
});

function openDialog()
{
    top.$.pdialog.open({url:"pages/dataform/Search.aspx",id:"Search",title:"Demo",min:false,mask:true});
} 

function getValue()
{
    alert($("#combox").select2("val"));
}

function alertMsg()
{
    top.Message.ok("操作成功？");  
    top.Message.error("操作錯誤？");  
    top.Message.warn("操作警告？");  
}

function ShowGetUser()
{
    top.$.pdialog.open({url:"pages/user/selectuser.aspx",id:"selectuser",title:"選擇人員",min:false,mask:true,width:"650",height:"500"});
} 